in general, a lambda function is a function that takes any number of arguments and returns the value of a single expression 一般来说,lambda函数接收任何数目的参数,并返回单个表达式的值。
uses jython s list comprehension to turn each result into a line written in slaries . txt with the lambda function tostr 通过jython的列表理解,用lambda函数tostr将每个结果变成slaries.txt中的一行。
to illustrate how functional programming features of jython can be used here, lambda function and list compression are used in the following code though it can be done in imperative programming style as well 为了说明如何在这里使用jython的函数编程功能,下列代码中使用了lambda函数和列表理解,虽然也可以用命令式(imperative)编程风格来完成。